use std::collections::BinaryHeap;

#[test]
fn test_heap(){
    let mut h:BinaryHeap<u32> = BinaryHeap::new();
    for _ in 0..10 {
        let x: u32 = rand::random();
        h.push(1+x%9);  // 随机1-9
    }

    println!("{:?}", h);

    for i in 0..h.len() {
        println!("item[.{}] = {:?}",i, h.pop());
    }
    println!("{:?}", h)

}